package com.aizhixin.test.question.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aizhixin.test.question.dao.addOrDeleteOrChangeQuestionDAO;
import com.aizhixin.test.question.dto.addChangeDeleteQuestionDTO;
import com.aizhixin.test.question.dto.addorChangeOrDeleteoptionDTO;

@Service
@Transactional
public class addorchangeordeleteQuestionService {
	@Autowired 
	private addOrDeleteOrChangeQuestionDAO addOrDeleteOrChangeQuestionDAO;
	
	public addChangeDeleteQuestionDTO addQuestion(addChangeDeleteQuestionDTO dto) {
		return addOrDeleteOrChangeQuestionDAO.addquestion(dto);
		
	}

	public addorChangeOrDeleteoptionDTO addoption(addorChangeOrDeleteoptionDTO dto) {
		
		return addOrDeleteOrChangeQuestionDAO.addoption(dto);
	}

	public addChangeDeleteQuestionDTO chandequestion(addChangeDeleteQuestionDTO dto) {
		
		return addOrDeleteOrChangeQuestionDAO.changequestion(dto);
	}

	public addorChangeOrDeleteoptionDTO changeoption(addorChangeOrDeleteoptionDTO dto) {
		
		return addOrDeleteOrChangeQuestionDAO.changeoption(dto);
	}

	public boolean deleteQuestionAndOption(Long questionID) {
		
		return addOrDeleteOrChangeQuestionDAO.deleteQuetionAndOption(questionID);
	}

	public Long getsteamid() {
		
		return addOrDeleteOrChangeQuestionDAO.seleceLastSteamId();
	}

}
